
import lombok.extern.slf4j.Slf4j;
import org.huang.sample10.AppServer;
import org.huang.sample10.dal.dao.db1.DeptMapper;
import org.huang.sample10.dal.dao.db2.StudentMapper;
import org.huang.sample10.dal.dao.db3.TClassMapper;
import org.huang.sample10.dal.dataobject.Dept;
import org.huang.sample10.dal.dataobject.Student;
import org.huang.sample10.dal.dataobject.TClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

/**
 * @描述:
 * @作者 Mr.Huang
 * @创建时间 2017-08-07
 * @版本: 1.0
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AppServer.class)
@Slf4j
public class SpringBootTestMybatis {

    @Resource
    private DeptMapper deptMapper;

    @Resource
    private StudentMapper studentMapper;

    @Resource
    private TClassMapper tClassMapper;

    @Test
    public void test_deptMapper(){
        List<Dept> all = deptMapper.selectAll();
        log.error(String.valueOf(all));

        List<Student> students = studentMapper.selectAll();
        log.error(String.valueOf(students));

        List<TClass> tClasses = tClassMapper.selectAll();
        log.error(String.valueOf(tClasses));
    }


}
